<div class="layuimini-main">

    <div class="layui-form layuimini-form">
        <div class="layui-form-item">
            <label class="layui-form-label required">任务名称</label>
            <div class="layui-input-block">
                <input type="text" id ="jobName" name="jobName" lay-verify="required" lay-reqtext="任务名称不能为空" placeholder="请输入任务名称"
                       value="" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">任务分组</label>
            <div class="layui-input-block">
                <input type="text" id ="jobGroup" name="jobGroup" lay-verify="required" lay-reqtext="任务分组不能为空" placeholder="请输入任务分组"
                       value="" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">任务路径</label>
            <div class="layui-input-block">
                <input type="text" id ="jobUrl"  name="jobUrl" lay-verify="required" lay-reqtext="任务路径不能为空" placeholder="请输入任务路径"
                       value="" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">任务方法</label>
            <div class="layui-input-block">
                <input type="text" id = "jobMethod"  name="jobMethod" lay-verify="required" lay-reqtext="任务路径不能为空" placeholder="请输入任务路径"
                       value="" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">任务时间</label>
            <div class="layui-input-block">
                <input type="text" id  ="jobCron" name="jobCron" lay-verify="required" lay-reqtext="任务时间不能为空" placeholder="请输入任务时间"
                       value="" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">任务参数</label>
            <div class="layui-input-block">
                <input type="text" id = "jobArguments" name="jobArguments" placeholder="请输入任务参数" value="" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">任务类型</label>
            <div class="layui-input-block">
                <input type="radio" id = "jobType" name="jobType" value="0" title="本地" checked="">
                <input type="radio"  name="jobType" value="1" title="远程">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">任务类型</label>
            <div class="layui-input-block">
                <input type="radio" name="jobStatus" value="0" title="开启" checked="">
                <input type="radio" name="jobStatus" value="1" title="关闭">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
            </div>
        </div>
    </div>
</div>
<script>
    layui.use(['form', 'table'], function () {
        var form = layui.form,
            layer = layui.layer,
            table = layui.table,
            $ = layui.$;

        /**
         * 初始化表单，要加上，不然刷新部分组件可能会不加载
         */
        form.render();
        form.render('select');
        // 当前弹出层，防止ID被覆盖
        var parentIndex = layer.index;

        //监听提交
        form.on('submit(saveBtn)', function (data) {
            var index = layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            }, function () {

                // 关闭弹出层
                layer.close(index);
                layer.close(parentIndex);

            });


            return false;
        });

    });
</script>